import riot.challenge.java.achievements.gamespecific.ButcherGameSpecificAchievement;
import riot.challenge.java.achievements.gamespecific.GameSpecificAchievement;
import riot.challenge.java.achievements.historical.HistoricalAchievement;
import riot.challenge.java.achievements.historical.SerialKillerHistoricalAchievement;
import riot.challenge.java.interfaces.IHistoricalPlayerStatistics;
import riot.challenge.java.interfaces.IPlayerGameStatistics;
import riot.challenge.java.interfaces.IStatistics;
import riot.challenge.java.model.Player;
import riot.challenge.java.statistics.HistoricalPlayerStatistics;
import riot.challenge.java.statistics.PlayerGameStatistics;


public class Main {

	/**
	 * @param args
	 */
	public static void main(String[] args) {
		
		// Historical Achievement test
		System.out.println("Historical Achievement test\n");
				
		IHistoricalPlayerStatistics historicalStats = new HistoricalPlayerStatistics();
		Player player1 = new Player("Syzwick", historicalStats);
		
		HistoricalAchievement skha = new SerialKillerHistoricalAchievement();
		
		boolean result = skha.isAchieve((IStatistics) player1.getHistoricalStats());
		String str = (result) ? "has achieved" : "has not achieved";
		System.out.println(player1.getName() + " " + str + " " + skha.getAchievementLabel() + " (" + skha.getAchievementDescription() + ").");
		
		historicalStats.setTotalNumberOfKills(110);
		
		result = skha.isAchieve((IStatistics) player1.getHistoricalStats());
		str = (result) ? "has achieved" : "has not achieved";
		System.out.println(player1.getName() + " " + str + " " + skha.getAchievementLabel() + " (" + skha.getAchievementDescription() + ").");
		
		// Game Specific Achievement test
		System.out.println("\n\nGame Specific Achievement test\n");
		
		IPlayerGameStatistics pgs = new PlayerGameStatistics();
		
		GameSpecificAchievement bgsa = new ButcherGameSpecificAchievement();
		
		result = bgsa.isAchieve((IStatistics) pgs);
		str = (result) ? "has achieved" : "has not achieved";
		System.out.println(player1.getName() + " " + str + " " + bgsa.getAchievementLabel() + " (" + bgsa.getAchievementDescription() + ").");
		
		pgs.setTotalAmountOfDamageDone(20000);
		
		result = bgsa.isAchieve((IStatistics) pgs);
		str = (result) ? "has achieved" : "has not achieved";
		System.out.println(player1.getName() + " " + str + " " + bgsa.getAchievementLabel() + " (" + bgsa.getAchievementDescription() + ").");
	}

}
